﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/default.Master" AutoEventWireup="true"
    CodeBehind="Plan-List.aspx.cs" Inherits="NRCP.Plan_List" %>

<%@ Import Namespace="NRCP.Helpers" %>
<%@ Import Namespace="Imgalib.Utility" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="grid_18 alpha">
        <asp:GridView ID="grvPlans" runat="server" SkinID="GridView">
            <Columns>
                <asp:BoundField DataField="PlanYear" HeaderText="Plan Year" />
                <asp:BoundField DataField="CreatedBy" HeaderText="Created By" />
                <asp:TemplateField HeaderText="Date Created">
                    <ItemTemplate>
                        <%# Convert.ToDateTime(Eval("CreateDate")).ToShortDateString()%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <table class="iconGrid">
                            <tr>
                                <td>
                                    <img src='<%= SiteSettings.BaseUrl %>App_Themes/default/images/<%# (Eval("Status")!=null && Eval("Status").ToString() == "Pending") ? "icon_pending.png" : "icon_complete.png" %>'
                                        title='<%# (Eval("Status")!=null && Eval("Status").ToString() == "Pending") ? "Pending" : "Complete" %>' />
                                </td>
                                <td>
                                    <img src='<%= SiteSettings.BaseUrl %>App_Themes/default/images/<%# (Eval("ApprovalStatus")!=null && Eval("ApprovalStatus").ToString() == "Approved") ? "icon-approve.png" : "icon-decision.png" %>'
                                        title='<%# (Eval("ApprovalStatus")!=null && Eval("ApprovalStatus").ToString() == "Approved") ? "Approved" : "Not Approved" %>' />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <table class="iconGrid">
                            <tr>
                                <td>
                                  <%--  <a href="<%= SiteSettings.BaseUrl %>plan-details.aspx?params=<%# Cryptography.Encrypt(Eval("Id").ToString()) %>"
                                        style='display: <%# Eval("Status").ToString()=="Pending"?"none":"visible" %>'
                                        title="Show Plan Details">--%>
                                        <a href="<%= SiteSettings.BaseUrl %>plan-details.aspx?params=<%# Cryptography.Encrypt(Eval("Id").ToString()) %>"
                                        title="Show Plan Details">
                                        <img src='<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon-view.png' /></a>
                                    <a href="<%= SiteSettings.BaseUrl %>plan.aspx?params=<%# Cryptography.Encrypt(Eval("Id").ToString()) %>"
                                        style='display: <%# Eval("Status").ToString()!="Pending"?"none":"visible" %>'
                                        title="Complete Rest Of The Plan">
                                        <img src='<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon-add.png' /></a>
                                </td>
                                <td>
                                    <a href="<%= SiteSettings.BaseUrl %>plan-monitoring-schedule.aspx?params=<%# Cryptography.Encrypt(Eval("Id").ToString()) %>"
                                        
                                        title="Create/Update Monitoring Schedule">
                                        <img src='<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon-planner.png' /></a>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="grid_6 omega">
        <h6>
            Plan Status</h6>
        <img src="<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon_pending.png" />
        Pending
        <br />
        <img src="<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon_complete.png" />

        Complete
        <br />
        <h6>
            Approval Status</h6>
        <img src="<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon-approve.png" />

        Approve
        <br />
        <img src="<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon-decision.png" />

        Not Approved
        <br />
        <h6>
            Options</h6>
        <img src='<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon-view.png' />
        Show Plan
        <br />
        <img src='<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon-add.png' />
        Complete Plan
        <br />
        <img src='<%= SiteSettings.BaseUrl %>App_Themes/default/images/icon-planner.png' />
        Create/Update Monitoring Schedule
    </div>
    <br class="clear" />
    <div class="grid_18 mGrid">
        <div class="grid_11 alpha pgr">
            <table>
                <tr>
                    <asp:Repeater ID="repPager" runat="server" OnItemCommand="repPager_ItemCommand">
                        <ItemTemplate>
                            <td>
                                <asp:LinkButton ID="lnbPageIndex" runat="server" CssClass="pgr" CommandArgument='<%# Container.DataItem.ToString() %>'><%# Container.DataItem.ToString() %></asp:LinkButton>
                            </td>
                        </ItemTemplate>
                    </asp:Repeater>
                </tr>
            </table>
        </div>
        <div class="grid_5 omega pgr-count">
            Total
            <asp:Literal ID="litTotalRecordCount" runat="server"></asp:Literal>
            Records Found
        </div>
    </div>
</asp:Content>
